import request from '@/utils/request';

// 新增
export function addItem (data) {
  return request ({
    url: '/app/peis/detail',
    method: 'post',
    data,
  });
}
// 编辑
export function updateItem (data) {
  return request ({
    url: '/app/peis/detail',
    method: 'put',
    data,
  });
}
// 删除
export function deleteItem (id) {
  return request ({
    url: `/app/peis/${id}/detail`,
    method: 'delete',
  });
}
// 详情
export function getItem (id) {
  return request ({
    url: `/app/peis/${id}/detail`,
    method: 'get',
  });
}
// 获取列表
export function getList (data) {
  return request ({
    url: '/app/peis/detail-list',
    method: 'get',
    params: data,
  });
}
// 导入excel
export function importExcel (data) {
  return request ({
    url: '/app/peis/detail/import-excel',
    method: 'post',
    data,
  });
}